package ru.vsu.cs.pm;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import ru.vsu.cs.pm.pages.*;

/**
 * Base page for other pages
 */
public class BasePage extends WebPage {

	private static final long serialVersionUID = 1L;

    public BasePage() {
        add(new Label("userName", PMSession.get().getAuthenticatedUser().getUserName()));
        add(new BookmarkablePageLink<LogoutPage>("logoutLink", LogoutPage.class));

        //user menu
        add(new BookmarkablePageLink<AccountListPage>("accountListLink", AccountListPage.class));
        add(new BookmarkablePageLink<ItemListPage>("itemListLink", ItemListPage.class));
        add(new BookmarkablePageLink<MoneyTransferPage>("transferLink", MoneyTransferPage.class));
        add(new BookmarkablePageLink<ReserveAccountPage>("reserveLink", ReserveAccountPage.class));
        add(new BookmarkablePageLink<MoneyTransferListPage>("transfersListLink", MoneyTransferListPage.class));
    }
}
